package com.itheima.reggie.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.itheima.reggie.dto.OrdersDto;
import com.itheima.reggie.pojo.Orders;

import java.time.LocalDateTime;

public interface OrdersService extends IService<Orders> {

    /**
     * 下单
     * @param orders
     */
    void submit(Orders orders);

    /**
     * 移动端订单分页查询
     */
    Page<OrdersDto> selectPage(Integer page, Integer pageSize);

    /**
     * 客户端带条件分页查询
     */
    Page<OrdersDto> selectByPage(Integer page, Integer pageSize, String number, LocalDateTime beginTime, LocalDateTime endTime);

    /**
     * 自定义添加方法(再来一单)
     * @param orders
     */
    void add(Orders orders);
}
